home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 26
/
Cream of the Crop 26.iso
/
program
/
ddj0897.zip
/
RCSC.ZIP
/
PACKAGES
/
AWK320.ZIP
/
XREF.AWK
< prev
Wrap
Text File
|
1991-04-24
|
623b
|
28 lines
# generate cross reference of identifiers in a program
# Original program courtesy Bruce Feist of Arlington VA
{
# remove non alphanumeric characters
gsub (/[`~!@#%\^&\*\(\)\+\|\-=\\\[\]{};':\",\./\<\>\?\/]/, " ")
# convert to upper case
$0 = toupper($0)
# add reference
for (i = 1; i <= NF; i++)
{
if ($i !~ /^[0-9]+$/ && done[$i] != NR) # check if number or done
{
done[$i] = NR # mark as done
xref[$i] = xref[$i] " " NR # add reference
}
}
}
END {
for (i in xref)
print i ": ", xref[i]
}